fixes bug #22