Fixed a bug in updating waiting list.