Added some debug
Fixed wrong view ref