fixed #207 (by @AlexTrask)