fixing issue #14
fixing issue #21