Fix utility function

It now works
Merge pull request #12 from dockyard/bc-fix-utility-function

Fix utility function