Fixing and adding conditions.