fix some issues under debian machine