Removed extra switch case and fixed bug for status change.