fixes before save action