Added rescue clause to prevent error and allow tests to pass.