Added onattach to NAMESPACE