fixes and closes #47