Switched detections to std::vector, but caused seg fault in getChild!?