Changed type of loc parent field from str to loc, resolves #631