Bugfix, and improved speed.