Fixes location creation bugs