Marker detection bugfix