fix issue with .append() and no elements