Bug fix with max lines