Fixed for issue #1228

I'm not sure if this is the correct way to fix the issue but in my testing it seams to resolve the issue.