added support for imenu, fixed a bug in 3dec mode