fixes and closes #248