Working on tracking down the bug.
Working bugs for writing into database.