Cleanup
Fix a typo and a bug