fixed some last minute bugs