fixed critical bug in views handler