Bug: null pointer on getNextID