fixes #68 and closes #50