fix for ACT-1685 and ACT-1679
Merge branch 'master' of https://github.com/Activiti/Activiti