detection max width and height were being improperly treated as a fraction rather than a percent