fixing modeoperation