Small bugfix. catched dbwriter being null