fix code for 2.5 compatibility
correction to TRmorrie