fixed errors from Object.cpp