fixes bug #22

fixes bug #22