fixed nltm routine