Hopefully fixed an NPE.