fix capacity not working