Changed the sort order column of status from status_name to sortorder.