Fixing issue #48 issue #49 issue #50 issue #51