fixed some code and test stupidities