fixing lots of crap to make work on cs server