Fixed problem of moving coordinates back into sphere after minimisation