trying to fix elemnt type bug