Fix element appending