Make double casting safe.