fix #461, cleanup