Fix the branch implementation, provide accurate offsets in more cases