fixing exception in unqueue