Added extra error handling (Found in icbot logs)