ensure queue is not None and some typo
typo