added disabling of continous mode
debugging
corrected a name error