fix NPE (forget some changes to make during last commit)