Fix location mark logic