Fixes undefined local variable or method `project' on index view