Fix stacksize issues