Fixed database related issues. Should now work.