some code cleanup around instamarker destroyed function