Fixed issues with dist calling