Fixed bugs in king safety evaluation