Use pointer_cast, Changed getHandle() methods.