Bug fix in localities localities object output

Fixed bug where locality output as string instead of object in some
cases.