Don't override if type is correct

Fixes #313.