Change min to max in a few more spots!!!