bugfixes. 53 test cases