Corrected NPE reported by ProsperCraft.