fixed varargs warning
fixed weird reference bug