fixed capacity bugs