Fix a IndexOutOfBounds issue when deleting a mashstep