Fix saving user and pages to database.