fixed mode 3 bug