Fixed unused variable warnings