Update code.php

added check for queue, does not fail if queue does not exist