Fixed remove object bug left over from js reorganization