Fix postgresql problems (hopefully) D: