Fixed deprecated getOwner() function