Fixed a few problem with the dist task.