fix a couple of last minute bugs