fixed bug causing invalidobjectexception while performing initial wireup