fixed king bug