Replaced apply max with common:max in few places