This was due to curve being not extrapolated correctly. Also curvemap range was not taken into account.