added additional safety to mount macro