last empty elements fix