fixing small bugs in pay and callback