trying to fix branch exception