Fixed a few last minute bugs