fixed strange off-and-on error