Fix env server segv in collision checking with environment