Fixed exception raised wrongly in objectstore