Fix marker hide/show logic