fix empty stack issue on operation without enter