Bug fixes

Fixed little mistakes.