fixed bug in allocateFrame() now passes all tests