Misspelled acquire raised Exception
deque does not have method empty(). Replaced check in if condition