added condition, to prevent status changes