Fixed: some errors introduced by refactoring, case insensitive problem, delayed highlighting problem