Commit fixing more bugs

Fixed a few more bugs.