Add the boolean variable to make sure if there are data in the queue