Fixing bug that not update icon when show or hide programmatically