Fixed training max allowing nil/nan values.