Fixed error management in background method