fixes and closes #6