fixed a nasty bug in levmar