Extra error handling + amendment for last commit