Fixed MVC bugs