fixing some minor issues raised by sonar