fixed lastack issue