Patch: assessment

max(varchar()) does not work updated to cast varchar as int