merged pull request from https://github.com/tobykurien/Sparkler/pull/2