Fixed stupid C++ child casting error