clean up error when checking branch