Ensuring proper attachment of custom properties