Used proper syntax for detecting king