fixed NPE on implicit variable declarations