fix issue where width was being computed based on 2 maximum values