shitload of backend fixes, kudos to henri