Fix a few bugs in the paytrail controller
Merge branch 'hotfix/0.2.1'