resolved mode not defined error