fixed bugs in getObjectAttributes