Fix midkey bug

Fix midkey  bug