Fix NPE on version checking