This shouldn't be merged. This is not the right way to fix #333. I will look at this next week.