Fixed get_stack bug
Fixed tests