various fixes and new options for PE format