Merge fix for #41 into jQuery plugin.