added proper preconditions and fixed bug (conditions were not copied in the action, therefore not saved)