Closes several bugs reported on debian bug tracker.