fix wrong if statement and reset out_pad if we fail to apply
fix wrong if statement and reset out_pad if we fail to apply

ahmedammar/skype_farsight2,ahmedammar/skype_farsight2,ahmedammar/skype_farsight2,ahmedammar/skype_farsight2