And it works with modules - fixes #4