Fix attributes type bug