fix maximum stack