Fixes #230

Please verify it carefully because I don't know how to build it!