cleanup and test fix