fixed bugs when adding/editing calculation steps