fixes to small bugs