Had the same problem myentity.flags2 |=VISIBLE is the solution.