Fixed toggle view bug