Two small fixes to avoid Sonar warnings