Fix NPE
Remove useless imports