changes to handle no data in views