weird reference error