adding fix for pause leaving insert mode