adjusting marker popup logic