Fixes #527. Error caused by passing a variable a factor of 8 out.
Merge pull request #529 from duncanspumpkin/fix_527

Fix #527