fixes and closes #626