fixed bug in findPalaceSpaces