fixed issue with passing data to view