Fixes #522
LGTM! thanks @abompard
rebased onto 86f39f7f9b8f21a5247fb05b774dcdcd465e4b6f
Pull-Request has been merged by abompard
Fixes #522