Fix bug from removing useless views