fixes #33 (special thanks to @aeirola)