fixed not writing to the db