Oh sorry, It's just a newbie's fault. I encountered the problem when I set the entity to INVISIBLE then I set the flag of entity to SHOW (to make the entity visible). To my fix my problem I just reset the entity to INVISIBLE.