fix bugs some of the bugs found yesterday