This should fix #1 at least for the basic functionality.