Fixed some small bugs in backend, still needs testing