Fixes #530
rebased onto 364477089f55ee1c1f0d9a7cf69b138ee37046cb
rebased onto 236071652b164048cac3124a76668aaf0bbdfe51
rebased onto f3163f81e01f6e70ba38aa482902d3a7b51b8f98
LGTM!
rebased onto 7c5376bafb6657934d4eeaef5c2fc3765718bf55
Pull-Request has been merged by abompard
Fixes #530