fixed some hidden bugs: when popping form open queue, the priority needs to be passed in as well.  isinstance fails when the two classes are imported differently