fix NPE in commit