Fix NullPointerException at WriterLocal.java:306