Various backend fixes