fixed bug in testing object references