fixed an Avro compiling error due to wrong scope