Modified the 'mode' in setter.

It seems to be working . However, there are some modes which may not
work properly. I'm not sure yet, I have to test the setter to find out.