fix preconditions