fixed max statement to work with int_t