fixes #51 and #48
Merge branch 'engine' into PDP