Fix ownership check