Moving objectMapping clearing closer to where they are reset
Fix for issue #1233