calling next on error