Fix debug method in view