Fix for Issue Issue #114

Fix for Issue #114 based on the solutions provided in the comments of the issue