Fixing #1026
Merge pull request #1058 from halcyon22/patch-1

Fixing #1026