Fixed problems in backend