fixed typo with Math.max in activities.search controller method