Fixed bugs

Fixed a few bugs I missed.