Some fix of previous bugs.