Fixing issue #5: Thanks to @alan-martinovic