fixed lots of little bugs