Fixed bug with shared objects