Fix possible NPE in ChunkManager. Closes #478 in reality