fix and closes bug #2