several fixes for a successful build