fix error where king's position was not being properly set