Fixed endless loop since parent matching