Fixed last minute bugs