Fixed bugs around reading from wes db callbacks.