Fixed bug #126 -- not tested yet