Fixes #7. It turned out that the previous fix was quite stupid.