Update code profile
Fix problem in distance