Fixed minor bugs

This is why you test before committing.