fixed problem with dense mode -- introduced in previous fices