fixed SharedObject crashing bug

Change-Id: I9f68b07949ada687379bd0f3fb8d4b728612ff20