Fixed issue which makes a dartanalyzer warning

Closes issue #12