added some changes to improve debian packageability