fixed the view changing bug. A solution process is listed in the first view change method