fixed bug when elements have a fixed header