correction for stimOn

it was considering the entire signal although it has to be limited to
the stimOn part; which is fixed now.