This fixes #1587; thanks to @Ant59

Signed-off-by: Yoshi2889 <rick.2889@gmail.com>
Merge pull request #1652 from Yoshi2889/1587

This fixes #1587; thanks to @Ant59