fixing stacking bugs