fixing issue #976

fixed https://github.com/kframework/k/issues/976

@dwightguth please review