Made M-RET work in shell mode, too