Fixed bug with invalid stack pointer