some fix for marging last element