compiler review
fix NPE
deprecated