Fixed #19.

This fixes #19 which causes a lot of issues.