Added code suggested by @fahadnabbasi .  fixes #5