Fixing #524 - but I'm afraid the fix isn't retroactive to existing tables