Realized Queue is not thread safe, resolved a data race