Fixed applyConstraints return type.