Fixed problems with DB