Fixes #50

retargeted to develop