Bugfix: config mode was not set correctly
Add rspec tests