final fix for #1240
Merge pull request #440 from kobotoolbox/tp1240

final fix for #1240