Fix instance check