fix pre-conditions