Fixing compilation issue. Added Max(A, B) template func