patches for allegro compatibility