Resolved the array queue implementation