fixed: goto error handling

use 'break' instead of calling function