Bug fixes; typo