After you file

keep the $40 and show it on the amended return as refund received. this will increase the amount you have to pay by $40.