Fixed some issues with #96.