Fix a bug with the config option

Now this is tested as well. Bug detected by updated jshint.
Add changelog for 0.3.1