Removed dynamic_cast calls