fix error when status has been changed

fixing bug reported on issue #1321