Added a viewChanged callback