Fix for issue #1 by barachy