Yet another NPE, fixed (I hope)