Fix NPE (I should've thought of this)