added check if spatialConstraintcontrol exists