bug and disribution fixes