Fix objectstore bugs

@devoncarew PTAL thanks.