fix basic queue's some bugs.