Fixed issue #22; fixed issue #21;