Fixed scope issue. Fixes #44