Problems with database fixed