fixed a problem found by mr allen