Fix attributes returning nil when record has been loaded from database.