Fix create element issue