Solved a bug on the markers functionality