Fixed error with mongoose static methods