Fixed return values in dequeue functions