fixed up some small bugs