Fixes

Fixes #636 and #634