Fixed a bug which caused the last view name to be displayed constantly