added a comment and slightly changed the code. Should resolve issue #45