Fixed a bug where elements at top=0 weren't considered stacked