Clean up
Fix for #1245