Fixed NPE reported by Steven Tomer on ML