fixed unused var ref