fixed noMethodError for a nil order