Fixed problem with dist