fix overflow warnings