fixing marker intersection logic