fixed lots of broken stuff