Fix bug with not initializing attributes when not set