Fixes 521

Signed-off-by: SleePy
Merge pull request #544 from jdarwood007/fix-521

 Fixes #521