Bug fixed frontdistance