Fixed issues with mixed operands anbd promoted primitive types