fixes #147
fix some compile warnings