Fix error to views and test