why cant write to db?