Fixed some bugs associated with waitlist.