fixing issue 781

fixing https://github.com/kframework/k/issues/781