several small fixes for debian wheezy