fixed unused var warnings