Fix bug in override attribute

Fixes #381