Solve king not switching problem