Updated for 1.5 compatability.