fixed triangle overflow