Fixed performance bug with markers