Uncanny Dodge

A creature with uncanny dodge retains its Dexterity bonus to AC (if any) even if it is caught flat-footed or struck by an invisible attacker (it is still considered flat-footed for other purposes). However, he still loses his Dexterity bonus to AC if immobilized or helpless. If a creature gains uncanny dodge from a second source, it automatically gains improved uncanny dodge instead.