Fix variable typo.
Fix spatial join logic error.