Fixed overlapping elements bug