Fix type error with 'dist'