fixed minor issues detected by gcc