improving trails box behavior