Fix undifined method error