Fixed a slight issue when passing data to view