fixes for strict C compliance