some major backend fixes