You should probably test for settings.method before processing further