bug fix when change filetype.

closed #2