Fix NPE in getOptions