cleanup and fix broken test