I don't understand why you have both queue and head.  When are they ever not equal to one another ?