[#1385] Fix NPE which was triggered if a write was executed but the HeadHandler not init yet