Improve tree and box behavior on collision