added probable bug & fixed IO mouse handling