Fixed Issue #2 (credits: @ivantcholakov)