another attempt to deal with ctrl-M problem