fixed an error with Schema is not being defined