Fixed errors in branches incrementing exit status