fix bug in (5) (6)