Fixed stack size bug