Fixes bug with wrong locations.