Fixed few last minute bugs