fixing a bug with status changes